// 1. 定义（路由）组件。
// 可以从其他文件 import 进来

//// 首页
const homepage = resolve => require(['./views/homepage/homepage'], resolve)
//// 个人中心
const user = resolve => require(['./views/user/user'], resolve)
// 数据概况
const data = resolve => require(['./views/user/settings/data'], resolve)
// 新增商家
const addstore = resolve => require(['./views/user/addstore'], resolve)
// 商家管理
const store = resolve => require(['./views/user/store'], resolve)
// 快捷留言
const quickword = resolve => require(['./views/user/quickword'], resolve) 
//反馈意见
const feedback = resolve => require(['./views/user/feedback'], resolve)
// 我的消息
const addadmin = resolve => require(['./views/user/addadmin'], resolve)
// 留言管理
const wordmanage = resolve => require(['./views/user/wordmanage'], resolve)
//系统管理
const admin=resolve => require(['./views/user/admin'],resolve)
//修改管理员
const editadmin=resolve => require(['./views/user/editadmin'],resolve)
//查看商家
const checkstore=resolve => require(['./views/user/checkstore'],resolve)
//修改商家
const editstore=resolve => require(['./views/user/editstore'],resolve)

// 2. 定义路由
// 每个路由应该映射一个组件。 其中"component" 可以是
// 通过 Vue.extend() 创建的组件构造器，
// 或者，只是一个组件配置对象。
// 我们晚点再讨论嵌套路由。
const routers = [{
	path: '/',
	component: homepage
},{
	path: '/user',
	component: user,
	children: [{
		path: '/user/data',
		component: data
	}, {
		path: '/user/addstore',
		component: addstore
	}, {
		path: '/user/store',
		component: store
	}, {
		path: '/user/quickword',
		component: quickword
	}, {
		path: '/user/addadmin',
		component: addadmin
	}, {
		path: '/user/wordmanage',
		component: wordmanage
	},{
		path:'/user/admin',
		component:admin
	},{
		path:'/user/editadmin',
		component:editadmin
	},{
		path:'/user/checkstore',
		component:checkstore
	},{
		path:'/user/editstore',
		component:editstore
	},{
		path:'/user/feedback',
		component:feedback
	}]
}]

export default routers;